import { hiyooo } from "../../core/HiYOOO";

export class GameConfig{

    private readonly _data:any = null;

    //获取本地配置文件localDataKey
    get localDataKey():string{
        return this._data.config.localDataKey;
    }

    //获取本地配置文件加密内容iv
    get localDataIv():string{
        return this._data.config.localDataIv;
    }

    //获取默认bundle名称
    get bundleDefault(){
        return this._data.bundle.default;
    }

    //是否开启手机安全区域适配
    get mobileSafeArea(){
        return this._data.config.mobileSafeArea || false;
    }

    
    get loadingTimeoutGui(){
        return this._data.config.loadingTimeoutGui;
    }
    
    //http接口地址 
    get httpServer(){
        return this._data.config.httpServer;
    }

    get httpTimeout(){
        return this._data.config.httpTimeout;
    }

    get frameRate(){
        return this._data.config.frameRate
    }

    get date():any{
        return this._data;
    }

 
    constructor(config:any){
        this._data = Object.freeze(config.json);
        hiyooo.log.logConfig(this._data,"游戏配置信息")

    }
}